<?php

declare(strict_types=1);

namespace App\Controller;

use Hyperf\Config\Annotation\Value;
use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\HttpServer\Contract\ResponseInterface;
use Hyperf\HttpServer\Annotation\AutoController;
use Hyperf\RateLimit\Annotation\RateLimit;


/**
 * Class RateLimitController
 * @package App\Controller
 * @AutoController()
 */
class RateLimitController extends AbstractController
{

    /**
     * @RateLimit(create=2, consume=2, capacity=4)
     * @param RequestInterface $request
     * @param ResponseInterface $response
     * @return array
     */
    public function index(RequestInterface $request, ResponseInterface $response)
    {
        $a=[1,2,3];
        var_dump([1,2,3]);
        return $a;
    }

}
